package com.moyun.mapper.system;

import com.moyun.model.common.PageParam;
import com.moyun.model.po.system.SysRoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author yangboxuan
 * @since 2021-07-01
 */
public interface SysRoleMapper extends BaseMapper<SysRoleEntity> {

    List<SysRoleEntity> selectRolesByUserId(Integer userId);

    List<SysRoleEntity> selectRolesWithMenus(PageParam<SysRoleEntity> param);

    SysRoleEntity selectRolesWithMenusBuRoleId(@Param("roleId") Integer roleId);

    List<SysRoleEntity> selectRolesWithMenusBuRoleIds(@Param("list") List<Integer> roleIds);

    List<SysRoleEntity> selectRolesWithPrivileges(PageParam<SysRoleEntity> param);

    SysRoleEntity selectRolesWithPrivilegesByRoleId(@Param("roleId") Integer roleId);


    List<SysRoleEntity> selectRolesWithPrivilegesByRoleIds(@Param("list") List<Integer> roleIds);
}
